package com.wontube.smr.client.constants;

import java.util.HashMap;
import java.util.Map;

/**
 * @author yuechao
 *
 */
public final class MovieGenres {
	private static final HashMap<Integer, String> reflectMap = new HashMap<Integer, String>();
	
	public static final String action_Adventure = "Action and Adventure";
	public static final String animation_Cartoons = "Animation & Cartoons";
	public static final String classics = "Classics";
	public static final String comedy = "Comedy";
	
	public static final String crime = "Crime";
	public static final String drama = "Drama";
	public static final String documentary_Biography = "Documentary & Biography";
	public static final String family = "Family";
	
	public static final String foreign = "Foreign";
	public static final String horror = "Horror";
	public static final String mystery_Suspense = "Mystery & Suspense";
	public static final String romance = "Romance";
	
	public static final String science_Fiction = "Science Fiction";
	public static final String sports = "Sports";
	public static final String indian_Cinema = "Indian Cinema";
	public static final String nigerian_Cinema = "Nigerian Cinema";
	
	public static final HashMap<String, Integer> allGenresMap = new HashMap<String, Integer>();
	
	public static String getGenreName(Integer genreValue) {
		String value = reflectMap.get(genreValue);
		return value == null ? "" : value;
	}
	
	static {
		allGenresMap.put(action_Adventure, 1);
		allGenresMap.put(animation_Cartoons, 2);
		allGenresMap.put(classics, 3);
		allGenresMap.put(comedy, 4);
		
		allGenresMap.put(crime, 5);
		allGenresMap.put(drama, 6);
		allGenresMap.put(documentary_Biography, 7);
		allGenresMap.put(family, 8);
		
		allGenresMap.put(foreign, 9);
		allGenresMap.put(horror, 10);
		allGenresMap.put(mystery_Suspense, 11);
		allGenresMap.put(romance, 12);
		
		allGenresMap.put(science_Fiction, 13);
		allGenresMap.put(sports, 15);
		allGenresMap.put(indian_Cinema, 18);
		allGenresMap.put(nigerian_Cinema, 19);
		
		for (Map.Entry<String, Integer> entry : allGenresMap.entrySet()) {
			reflectMap.put(entry.getValue(), entry.getKey());
		}
	}
}
